add a new option for spawning vncviewer
authorgzhai@edwin-gen.sh.intel.com <gzhai@edwin-gen.sh.intel.com>
Thu, 25 Aug 2005 11:20:22 +0000 (19:20 +0800)
committergzhai@edwin-gen.sh.intel.com <gzhai@edwin-gen.sh.intel.com>
Thu, 25 Aug 2005 11:20:22 +0000 (19:20 +0800)
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
tools/examples/xmexample.vmx
tools/python/xen/xm/create.py

index 77662fcca946d05121bbd62900307bc2c68dda4b..1c338beca403e396b69f424d9f55dc9fc6b9bb7b 100644 (file)
@@ -72,6 +72,10 @@ sdl=0
 # enable VNC library for graphics, default = 1
 vnc=1
 
+#----------------------------------------------------------------------------
+# enable spawning vncviewer(only valid when vnc=1), default = 1
+vncviewer=1
+
 #----------------------------------------------------------------------------
 # no graphics, use serial port
 #nographic=0
index ec4ab49c123cdc33576bafb37ed39f580ff9e82f..d8cfc70624ddbc8b82b77ddc339d074857aefb09 100644 (file)
@@ -103,12 +103,13 @@ gopts.opt('console_autoconnect', short='c',
           fn=set_true, default=0,
           use="Connect to the console after the domain is created.")
 
-gopts.var('vnc', val='no|yes',
+gopts.var('vncviewer', val='no|yes',
           fn=set_bool, default=None,
           use="""Spawn a vncviewer listening for a vnc server in the domain.
           The address of the vncviewer is passed to the domain on the kernel command
           line using 'VNC_SERVER=<host>:<port>'. The port used by vnc is 5500 + DISPLAY.
           A display value with a free port is chosen if possible.
+         Only valid when vnc=1.
           """)
 
 gopts.var('name', val='NAME',
@@ -309,6 +310,10 @@ gopts.var('nographic', val='no|yes',
           fn=set_bool, default=0,
           use="Should device models use graphics?")
 
+gopts.var('vnc', val='',
+          fn=set_value, default=None,
+          use="""Should the device model use VNC?""")
+
 gopts.var('sdl', val='',
           fn=set_value, default=None,
           use="""Should the device model use SDL?""")
@@ -442,7 +447,7 @@ def configure_vmx(opts, config_devs, vals):
     """
     args = [ 'memmap', 'device_model', 'cdrom',
             'boot', 'fda', 'fdb', 'localtime', 'serial', 'macaddr', 'stdvga', 
-             'isa', 'nographic', 'vnc', 'sdl', 'display']        
+             'isa', 'nographic', 'vnc', 'vncviewer', 'sdl', 'display']   
     for a in args:
        if (vals.__dict__[a]):
            config_devs.append([a, vals.__dict__[a]])
@@ -606,7 +611,7 @@ def preprocess_vnc(opts, vals):
     """If vnc was specified, spawn a vncviewer in listen mode
     and pass its address to the domain on the kernel command line.
     """
-    if not vals.vnc or vals.dryrun: return
+    if not (vals.vnc and vals.vncviewer) or vals.dryrun: return
     vnc_display = choose_vnc_display()
     if not vnc_display:
         opts.warn("No free vnc display")